\(\int \sec ^4(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x) \, dx\) [1505]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 90 \[ \int \sec ^4(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x) \, dx=-\frac {3 b \left (a^2-b^2\right ) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {3 \sec ^2(c+d x) (a+b \sin (c+d x)) \left (b^2+a b \sin (c+d x)\right )}{8 d} \]

[Out]

-3/8*b*(a^2-b^2)*arctanh(sin(d*x+c))/d+1/4*sec(d*x+c)^4*(a+b*sin(d*x+c))^3/d-3/8*sec(d*x+c)^2*(a+b*sin(d*x+c))
*(b^2+a*b*sin(d*x+c))/d

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {2916, 12, 819, 737, 212} \[ \int \sec ^4(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x) \, dx=-\frac {3 b \left (a^2-b^2\right ) \text {arctanh}(\sin (c+d x))}{8 d}-\frac {3 \sec ^2(c+d x) (a+b \sin (c+d x)) \left (a b \sin (c+d x)+b^2\right )}{8 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d} \]

[In]

Int[Sec[c + d*x]^4*(a + b*Sin[c + d*x])^3*Tan[c + d*x],x]

[Out]

(-3*b*(a^2 - b^2)*ArcTanh[Sin[c + d*x]])/(8*d) + (Sec[c + d*x]^4*(a + b*Sin[c + d*x])^3)/(4*d) - (3*Sec[c + d*
x]^2*(a + b*Sin[c + d*x])*(b^2 + a*b*Sin[c + d*x]))/(8*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 737

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d + e*x)^(m - 1)*(a*e - c*d*x)*((a
 + c*x^2)^(p + 1)/(2*a*c*(p + 1))), x] + Dist[(2*p + 3)*((c*d^2 + a*e^2)/(2*a*c*(p + 1))), Int[(d + e*x)^(m -
2)*(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && EqQ[m + 2*p + 2, 0] && Lt
Q[p, -1]

Rule 819

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d + e*x)^m*(
a + c*x^2)^(p + 1)*((a*g - c*f*x)/(2*a*c*(p + 1))), x] - Dist[m*((c*d*f + a*e*g)/(2*a*c*(p + 1))), Int[(d + e*
x)^(m - 1)*(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && EqQ[Simplif
y[m + 2*p + 3], 0] && LtQ[p, -1]

Rule 2916

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x
, b*Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {b^5 \text {Subst}\left (\int \frac {x (a+x)^3}{b \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d} \\ & = \frac {b^4 \text {Subst}\left (\int \frac {x (a+x)^3}{\left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d} \\ & = \frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\left (3 b^4\right ) \text {Subst}\left (\int \frac {(a+x)^2}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d} \\ & = \frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {3 \sec ^2(c+d x) (a+b \sin (c+d x)) \left (b^2+a b \sin (c+d x)\right )}{8 d}-\frac {\left (3 b^2 \left (a^2-b^2\right )\right ) \text {Subst}\left (\int \frac {1}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 d} \\ & = -\frac {3 b \left (a^2-b^2\right ) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {3 \sec ^2(c+d x) (a+b \sin (c+d x)) \left (b^2+a b \sin (c+d x)\right )}{8 d} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(370\) vs. \(2(90)=180\).

Time = 1.03 (sec) , antiderivative size = 370, normalized size of antiderivative = 4.11 \[ \int \sec ^4(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x) \, dx=\frac {2 a \left (a^2-b^2\right )^2 \sec ^4(c+d x) (a+b \sin (c+d x))^4+2 b \left (a^2-b^2\right ) \sec ^4(c+d x) (b-a \sin (c+d x)) (a+b \sin (c+d x))^5+b \sec ^2(c+d x) (a+b \sin (c+d x))^5 \left (5 a^2 b+b^3-3 a \left (a^2+b^2\right ) \sin (c+d x)\right )+\frac {1}{2} \left (5 a^4 b+10 a^2 b^3+b^5\right ) \left (3 \left ((a+b)^4 \log (1-\sin (c+d x))-(a-b)^4 \log (1+\sin (c+d x))\right )+6 b^2 \left (6 a^2+b^2\right ) \sin (c+d x)+12 a b^3 \sin ^2(c+d x)+2 b^4 \sin ^3(c+d x)\right )-a b \left (a^2+b^2\right ) \left (6 (a+b)^5 \log (1-\sin (c+d x))-6 (a-b)^5 \log (1+\sin (c+d x))+60 a b^2 \left (2 a^2+b^2\right ) \sin (c+d x)+6 b^3 \left (10 a^2+b^2\right ) \sin ^2(c+d x)+20 a b^4 \sin ^3(c+d x)+3 b^5 \sin ^4(c+d x)\right )}{8 \left (a^2-b^2\right )^3 d} \]

[In]

Integrate[Sec[c + d*x]^4*(a + b*Sin[c + d*x])^3*Tan[c + d*x],x]

[Out]

(2*a*(a^2 - b^2)^2*Sec[c + d*x]^4*(a + b*Sin[c + d*x])^4 + 2*b*(a^2 - b^2)*Sec[c + d*x]^4*(b - a*Sin[c + d*x])
*(a + b*Sin[c + d*x])^5 + b*Sec[c + d*x]^2*(a + b*Sin[c + d*x])^5*(5*a^2*b + b^3 - 3*a*(a^2 + b^2)*Sin[c + d*x
]) + ((5*a^4*b + 10*a^2*b^3 + b^5)*(3*((a + b)^4*Log[1 - Sin[c + d*x]] - (a - b)^4*Log[1 + Sin[c + d*x]]) + 6*
b^2*(6*a^2 + b^2)*Sin[c + d*x] + 12*a*b^3*Sin[c + d*x]^2 + 2*b^4*Sin[c + d*x]^3))/2 - a*b*(a^2 + b^2)*(6*(a +
b)^5*Log[1 - Sin[c + d*x]] - 6*(a - b)^5*Log[1 + Sin[c + d*x]] + 60*a*b^2*(2*a^2 + b^2)*Sin[c + d*x] + 6*b^3*(
10*a^2 + b^2)*Sin[c + d*x]^2 + 20*a*b^4*Sin[c + d*x]^3 + 3*b^5*Sin[c + d*x]^4))/(8*(a^2 - b^2)^3*d)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(182\) vs. \(2(84)=168\).

Time = 0.68 (sec) , antiderivative size = 183, normalized size of antiderivative = 2.03

method result size
derivativedivides \(\frac {\frac {a^{3}}{4 \cos \left (d x +c \right )^{4}}+3 a^{2} b \left (\frac {\sin ^{3}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {3 a \,b^{2} \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+b^{3} \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(183\)
default \(\frac {\frac {a^{3}}{4 \cos \left (d x +c \right )^{4}}+3 a^{2} b \left (\frac {\sin ^{3}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {3 a \,b^{2} \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+b^{3} \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(183\)
parallelrisch \(\frac {6 b \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a +b \right ) \left (a -b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-6 b \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a +b \right ) \left (a -b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+4 \left (-a^{3}-3 a \,b^{2}\right ) \cos \left (2 d x +2 c \right )+\left (-a^{3}+3 a \,b^{2}\right ) \cos \left (4 d x +4 c \right )+\left (-3 a^{2} b -5 b^{3}\right ) \sin \left (3 d x +3 c \right )+3 \left (7 a^{2} b +b^{3}\right ) \sin \left (d x +c \right )+5 a^{3}+9 a \,b^{2}}{4 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) \(217\)
risch \(\frac {{\mathrm e}^{i \left (d x +c \right )} \left (-24 a \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+3 i a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+5 i b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+16 a^{3} {\mathrm e}^{3 i \left (d x +c \right )}-21 i a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}-3 i b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-24 a \,b^{2} {\mathrm e}^{i \left (d x +c \right )}+21 i a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+3 i b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-3 i a^{2} b -5 i b^{3}\right )}{4 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{2} b}{8 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{3}}{8 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{2} b}{8 d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{3}}{8 d}\) \(284\)
norman \(\frac {\frac {2 a^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a^{3} \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (8 a^{3}+36 a \,b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (8 a^{3}+36 a \,b^{2}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {3 \left (2 a^{3}+4 a \,b^{2}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {3 \left (2 a^{3}+4 a \,b^{2}\right ) \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {3 b \left (a^{2}-b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {3 b \left (a^{2}-b^{2}\right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {3 b \left (11 a^{2}+5 b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {b \left (15 a^{2}+b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {b \left (15 a^{2}+b^{2}\right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {b \left (93 a^{2}+35 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {b \left (93 a^{2}+35 b^{2}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {3 b \left (a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}-\frac {3 b \left (a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) \(422\)

[In]

int(sec(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(1/4*a^3/cos(d*x+c)^4+3*a^2*b*(1/4*sin(d*x+c)^3/cos(d*x+c)^4+1/8*sin(d*x+c)^3/cos(d*x+c)^2+1/8*sin(d*x+c)-
1/8*ln(sec(d*x+c)+tan(d*x+c)))+3/4*a*b^2*sin(d*x+c)^4/cos(d*x+c)^4+b^3*(1/4*sin(d*x+c)^5/cos(d*x+c)^4-1/8*sin(
d*x+c)^5/cos(d*x+c)^2-1/8*sin(d*x+c)^3-3/8*sin(d*x+c)+3/8*ln(sec(d*x+c)+tan(d*x+c))))

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.59 \[ \int \sec ^4(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x) \, dx=-\frac {3 \, {\left (a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 24 \, a b^{2} \cos \left (d x + c\right )^{2} - 4 \, a^{3} - 12 \, a b^{2} - 2 \, {\left (6 \, a^{2} b + 2 \, b^{3} - {\left (3 \, a^{2} b + 5 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{16 \, d \cos \left (d x + c\right )^{4}} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

-1/16*(3*(a^2*b - b^3)*cos(d*x + c)^4*log(sin(d*x + c) + 1) - 3*(a^2*b - b^3)*cos(d*x + c)^4*log(-sin(d*x + c)
 + 1) + 24*a*b^2*cos(d*x + c)^2 - 4*a^3 - 12*a*b^2 - 2*(6*a^2*b + 2*b^3 - (3*a^2*b + 5*b^3)*cos(d*x + c)^2)*si
n(d*x + c))/(d*cos(d*x + c)^4)

Sympy [F(-1)]

Timed out. \[ \int \sec ^4(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x) \, dx=\text {Timed out} \]

[In]

integrate(sec(d*x+c)**5*sin(d*x+c)*(a+b*sin(d*x+c))**3,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.56 \[ \int \sec ^4(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x) \, dx=-\frac {3 \, {\left (a^{2} b - b^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (a^{2} b - b^{3}\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (12 \, a b^{2} \sin \left (d x + c\right )^{2} + {\left (3 \, a^{2} b + 5 \, b^{3}\right )} \sin \left (d x + c\right )^{3} + 2 \, a^{3} - 6 \, a b^{2} + 3 \, {\left (a^{2} b - b^{3}\right )} \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

-1/16*(3*(a^2*b - b^3)*log(sin(d*x + c) + 1) - 3*(a^2*b - b^3)*log(sin(d*x + c) - 1) - 2*(12*a*b^2*sin(d*x + c
)^2 + (3*a^2*b + 5*b^3)*sin(d*x + c)^3 + 2*a^3 - 6*a*b^2 + 3*(a^2*b - b^3)*sin(d*x + c))/(sin(d*x + c)^4 - 2*s
in(d*x + c)^2 + 1))/d

Giac [A] (verification not implemented)

none

Time = 0.48 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.58 \[ \int \sec ^4(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x) \, dx=-\frac {3 \, {\left (a^{2} b - b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - 3 \, {\left (a^{2} b - b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (3 \, a^{2} b \sin \left (d x + c\right )^{3} + 5 \, b^{3} \sin \left (d x + c\right )^{3} + 12 \, a b^{2} \sin \left (d x + c\right )^{2} + 3 \, a^{2} b \sin \left (d x + c\right ) - 3 \, b^{3} \sin \left (d x + c\right ) + 2 \, a^{3} - 6 \, a b^{2}\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-1/16*(3*(a^2*b - b^3)*log(abs(sin(d*x + c) + 1)) - 3*(a^2*b - b^3)*log(abs(sin(d*x + c) - 1)) - 2*(3*a^2*b*si
n(d*x + c)^3 + 5*b^3*sin(d*x + c)^3 + 12*a*b^2*sin(d*x + c)^2 + 3*a^2*b*sin(d*x + c) - 3*b^3*sin(d*x + c) + 2*
a^3 - 6*a*b^2)/(sin(d*x + c)^2 - 1)^2)/d

Mupad [B] (verification not implemented)

Time = 16.96 (sec) , antiderivative size = 228, normalized size of antiderivative = 2.53 \[ \int \sec ^4(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x) \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,a^2\,b}{4}-\frac {3\,b^3}{4}\right )+2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (\frac {3\,a^2\,b}{4}-\frac {3\,b^3}{4}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {21\,a^2\,b}{4}+\frac {11\,b^3}{4}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (\frac {21\,a^2\,b}{4}+\frac {11\,b^3}{4}\right )+12\,a\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {3\,b\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (a^2-b^2\right )}{4\,d} \]

[In]

int((sin(c + d*x)*(a + b*sin(c + d*x))^3)/cos(c + d*x)^5,x)

[Out]

(tan(c/2 + (d*x)/2)*((3*a^2*b)/4 - (3*b^3)/4) + 2*a^3*tan(c/2 + (d*x)/2)^2 + 2*a^3*tan(c/2 + (d*x)/2)^6 + tan(
c/2 + (d*x)/2)^7*((3*a^2*b)/4 - (3*b^3)/4) + tan(c/2 + (d*x)/2)^3*((21*a^2*b)/4 + (11*b^3)/4) + tan(c/2 + (d*x
)/2)^5*((21*a^2*b)/4 + (11*b^3)/4) + 12*a*b^2*tan(c/2 + (d*x)/2)^4)/(d*(6*tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (
d*x)/2)^2 - 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1)) - (3*b*atanh(tan(c/2 + (d*x)/2))*(a^2 - b^2))/
(4*d)